<%@ page language="java"  pageEncoding="UTF-8"%>
<%@ include file="/views/commons/taglibs.jsp" %>
<script src="<%=path %>/js/common.js"></script>
<div class="panel-heading">
	<div class="pull-right">
		<a href="javascript:queryAdminPlatformDataList(1);">返回</a>
	</div>
	<h3 class="panel-title">${dataPlatformVO.platformName}平台项目详情</h3>
</div>
<div class="bd clearfix">
	<form id="admin_platform_trade_choose_form" action="javascript:void(0);">
		<div class="filter-wrap">
			<d:radio describe="审核状态" tableColumn="audit_status" fieldName="auditStatus" 
				value="${paramMap.auditStatus}" type="query" queryFunction="queryAdminPlatformTradeList"></d:radio>
		</div>
		<input type="hidden" name="platformId" value="${paramMap.platformId}">
	</form>
</div>
<c:choose>
<c:when test="${!empty dataList && fn:length(dataList) ne 0}">
<table class="table">
	<thead>
		<tr>
			<th width="20%">项目名</th>
			<th width="15%">募集金额</th>
			<th width="25%">募集结束时间</th>
			<th width="10%">审核状态</th>
			<th width="30%">操作</th>
		</tr>
	</thead>
	<tbody>
		<c:forEach var="data" items="${dataList}" varStatus="index">
		<tr>
			<td>${data.projectName}</td>
			<td>${data.tradeAmount/10000}万元</td>
			<td><fmt:formatDate value="${data.tradeEndTime}" pattern="yyyy-MM-dd"/></td>
			<td>
				<c:choose>
					<c:when test="${data.auditStatus==1}">	
					待审核
					</c:when>
					<c:when test="${data.auditStatus==2}">	
					审核通过
					</c:when>
					<c:when test="${data.auditStatus==3}">	
					审核不通过
					</c:when>
				</c:choose>	
			</td>
			<td>
				<a href="javascript:deletePlatformTradeById('${data.platformTradeId}')" >删除</a>
				<c:if test="${data.auditStatus==1}">
				<a href="javascript:platformTradeAudit('${data.platformTradeId}',2)" >审核通过</a>
				<a href="javascript:platformTradeAudit('${data.platformTradeId}',3)" >审核不通过</a>
				</c:if>
			</td>
		</tr>
		</c:forEach>
	</tbody>
</table>
<!-- 分页 -->
<p:pagination pageNo="${paramMap.pageNo}" pageCount="${paramMap.pageCount}" queryFunction="queryAdminPlatformTradeList" style="text-center"></p:pagination>
<!-- 分页 end -->
</c:when>
<c:otherwise>
	<table class="table">
		<thead>
			<tr>
				<th width="20%">平台名</th>
				<th width="15%">成交金额</th>
				<th width="25%">募集成功项目数</th>
				<th width="10%">审核状态</th>
				<th width="30%">操作</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td colspan="6" align="center">
					暂无数据
				</td>
			</tr>
		</tbody>
	</table>
</c:otherwise>
</c:choose>